<?php
/**
 * SEO 产品列表, 隐藏内容
 *
 * @author Zeon <scplay@gmail.com>
 * @date 2018/8/28
 * @copyright PanxSoft Inc.
 *
 * @var \Illuminate\Pagination\LengthAwarePaginator $production
 * @var \App\Http\Models\Admin\Product $product
 */
?>

@if(isset($production) && $production->count())

<div class="seo-hidden product-category">
    {{-- 产品分类列表 --}}
    <ul class="product-list">
        @foreach($production as $product)
        <li class="product-item">
            <a class="product-link"
               href="{{ $product->link }}"
            >
                <img src="{{ $product->thumb }}" alt="" class="product-detail-thumb">
                <span class="product-title">{{ $product->title }}</span>
                <span class="product-model-number">{{ $product->model_number }}</span>
            </a>
        </li>
        @endforeach
    </ul>

    {{-- 输出分页器 --}}
    {{ $production->appends('pid', $product->product_category_id)->links() }}
</div>

@elseif(isset($product))

{{-- 产品详情 --}}
<div class="seo-hidden product">
    <h1 class="product-title">{{ $product->title }}</h1>
    <h3 class="product-model-number">{{ $product->model_number }}</h3>
    <img src="{{ $product->thumb }}" alt="" class="product-detail-thumb">
    <article>
        <p class="product-intro">{{ $product->intro }}</p>
        <p class="product-detail">{{ $product->detail }}</p>
    </article>
</div>

@endif
